<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Insert title here</title>
        <link rel="stylesheet" href="/js/jQuery-Validation/css/validationEngine.jquery.css" type="text/css" media="screen" charset="utf-8" />
        <script src="/js/jquery/jquery.js" type="text/javascript">
        </script>
        <script src="/js/jQuery-Validation/js/jquery.validationEngine-en.js" type="text/javascript">
        </script>
        <script src="/js/jQuery-Validation/js/jquery.validationEngine.js" type="text/javascript">
        </script>
        <script type="text/javascript">
            $(document).ready(function(){
				//$("#formID").validationEngine({}); 
				
				/*$("#formID").validationEngine({
					inlineValidation: false,
					openDebug: true,
					success :  function(){
						if (1==1){
							return false;
						}
					},
					failure : function() {alert("bed");}  
				})*/
				
				/*
				$("#formID").validationEngine({
					ajaxSubmit: true,
					ajaxSubmitFile: "/test/formvalid",
					ajaxSubmitMessage: "Thank you, we received your inscription!",
					success :  false,
					failure : function() {}

				});*/				
				
				$("#testV").click(function(){
					if($("#formID").validationEngine({returnIsValid:true})){
						
					}					
				});
				
            })
			
function validate2fields(){
   if($("#testDIV").html() == "test"){
    return true;
   }else{
    return false;
   }
}

        </script>
    </head>
    <body>
        <form id="formID" class="formular">           
                <br><br><br><br><br><br><br><br>
                <input value="" class="validate[required]" type="text" name="coco" id="coco" />
            	<div class="validate[funcCall[validate2fields]]" id="testDIV" class="">test</div>
			
			
			<!--<input class="submit" type="submit" value="Validate & Send the form!"/><br>-->
			
        </form>
		<button id="testV">valid</button>
		
    </body>
</html>